package com.quanyan.assets.emun;

import com.quanyan.common.enums.BaseEnum;

/**
 * Created by wmb on 2016/5/27.
 */
public enum AssetsErrorEnum implements BaseEnum {
    ASSETS_RECORD_EXIST(    23000, "ASSETS_RECORD_EXIST"    , "该记录已存在" , false),

    ASSETS_RULE_RECORD_DO_NOT_EXISTS(    23001, "ASSETS_RULE_RECORD_DO_NOT_EXISTS"    , "资产规则表记录不存在" , false),
    USER_ASSETS_RECORD_DO_NOT_EXISTS(    23002, "USER_ASSETS_RECORD_DO_NOT_EXISTS"    , "用户资产表记录不存在" , false),
    CURRENCY_RECORD_DO_NOT_EXISTS(    23003, "CURRENCY_RECORD_DO_NOT_EXISTS"    , "货币记录不存在" , false),
    CURRENCY_NAME_NOT_EXISTS(    23004, "CURRENCY_NAME_NOT_EXISTS"    , "货币记录不存在" , false),
    USER_ACCUMULATE_NOT_ENOUGH(    23005, "USER_ACCUMULATE_NOT_ENOUGH"    , "用户鸟蛋不足" , false),
    USER_ACCUMULATE_MODIFY_ERROR(    23006, "USER_ACCUMULATE_MODIFY_ERROR"    , "用户鸟蛋修改失败" , false),
    USER_ID_NULL(    23007, "USER_ID_NULL"    , "用户ID不能为空" , false),
    BUSINESS_ID_NULL(    23008, "BUSINESS_ID_NULL"    , "具体业务ID不能为空" , false),
    ORDER_AMOUNT_NULL(    23009, "ORDER_AMOUNT_NULL"    , "订单金额不能为空" , false),
    CURRENCY_NAME_NULL(    23010, "CURRENCY_NAME_NULL"    , "货币名称不能为空" , false),
    ASSETS_ID_NULL(    23011, "ASSETS_ID_NULL"    , "资产ID不能为空" , false),
    RMB_AMOUNT_NULL(    23012, "RMB_AMOUNT_NULL"    , "兑换RMB数量不能为空" , false),
    RULE_NO_TIMES(    23013, "RULE_NO_TIMES"    , "该规则次数用完" , false),
    ASSETS_RULE_IS_NULL(    23014, "ASSETS_RULE_IS_NULL"    , "用户规则表不能为空" , false),
    SYSTEM_CODE_IS_NULL(    23015, "SYSTEMCODE_IS_NULL"    , "系统编码不能为空" , false),
    BUSINESS_CODE_IS_NULL(    23016, "BUSINESSCODE_IS_NULL"    , "业务编码不能为空" , false),
    ASSETS_RULE_RECORD_EXISTS(    23017, "ASSETS_RULE_RECORD_EXISTS"    , "用户规则表已存在" , false),
    DESCRIBE_IS_NULL(    23018, "DESCRIBE_IS_NULL"    , "pDescribe不能为空" , false),
    KEY_IS_NULL(    23019, "KEY_IS_NULL"    , "pKey不能为空" , false),
    ACCUMULATE_RULE_IS_NULL(    23020, "ACCUMULATE_RULE_IS_NULL"    , "accumulateRule不能为空" , false),
    RULE_TYPE_IS_NULL(    23021, "RULE_TYPE_IS_NULL"    , "ruleType不能为空" , false),
    OP_TYPE_IS_NULL(    23022, "OP_TYPE_IS_NULL"    , "opType不能为空" , false),
    API_REQUEST_IS_NULL(    23023, "API_REQUEST_IS_NULL"    , "BUSINESS_CODE_IS_NULL" , false),
    ID_IS_NULL(    23024, "ID_IS_NULL"    , "id不能为空" , false),
    COPY_PROPERTY_ERROR(    23025, "COPY_PROPERTY_ERROR"    , "复制属性异常" , false),
    ACCUMULATE_IS_NULL(    23026, "ACCUMULATE_IS_NULL"    , "积分不能为空" , false),
    ACCUMULATE_IS_INVALID(    23027, "ACCUMULATE_IS_INVALID"    , "非法积分数" , false),
    MAX_ACCUMULATE_IS_NULL(    23028, "MAX_ACCUMULATE_IS_NULL"    , "最大积分不能为空" , false),
    STATUS_IS_INVALID(    23029, "STATUS_IS_INVALID"    , "非法状态" , false),
    UNFREEZE_IS_INVALID(    23030, "UNFREEZE_IS_INVALID"    , "非法解冻" , false),
    BUSINESS_NO_NULL(    23031, "BUSINESS_NO_NULL"    , "具体业务标识不能为空" , false),
    BUSINESS_NO_IS_EXIST(    23032, "BUSINESS_NO_IS_EXIST"    , "具体业务标识已存在" , false),
    UPDATE_ACCUMULATE_HISTORY_ERROR(    23033, "UPDATE_ACCUMULATE_HISTORY_ERROR"    , "更新鸟蛋历史积分失败" , false),
    BUSINESS_NO_IS_NOT_EXIST(    23034, "BUSINESS_NO_IS_NOT_EXIST"    , "具体业务标识不存在" , false),
    REFUND_IS_NOT_ENOUGH(    23035, "REFUND_IS_NOT_ENOUGH"    , "退款余额不足" , false),
    UPDATE_EGGES_ACCUMULATE_ERROR(    23036, "UPDATE_EGGES_ACCUMULATE_ERROR"    , "更新鸟蛋积分失败" , false),
    ASSETS_TYPE_IS_INVALID(    23037, "ASSETS_TYPE_IS_INVALID"    , "非法资产ID" , false),
    UNFREEZE_NOT_ONLY(    23038, "UNFREEZE_NOT_ONLY"    , "解冻存在多条记录" , false),
    UNFREEZE_USER_ACCUMULATE_FAIL(    23039, "UNFREEZE_USER_ACCUMULATE_FAIL"    , "解冻用户鸟蛋异常" , false),
    //鸟蛋钱包
    PAY_ID_INVALID(    23500, "PAY_ID_INVALID"    , "支付ID非法" , false),
    NO_LOGIN(    23501, "NO_LOGIN"    , "用户未登陆" , false),
    INVALID_ORDER_AMOUNT(    23502, "INVALID_ORDER_AMOUNT"    , "非法订单金额" , false),
    //优惠券
    ORDER_TYPE_IS_NULL(    23600, "ORDER_TYPE_IS_NULL"    , "订单类型不能为空" , false),
    SPORT_TYPE_IS_NULL(    23601, "SPORT_TYPE_IS_NULL"    , "运动类型不能为空" , false),
    ENABLED_AMOUNT_IS_NULL(    23602, "ENABLED_AMOUNT_IS_NULL"    , "启动金额不能为空" , false),
    COUPON_CODE_IS_NULL(    23603, "COUPON_CODE_IS_NULL"    , "优惠券编码不能为空" , false),
    VALID_USE_COUPON(    23604, "VALID_USE_COUPON"    , "该优惠券不能使用" , false),
    ORDER_NO_IS_NULL(    23605, "ORDER_NO_IS_NULL"    , "订单号不能为空" , false),
    MOBILE_IS_NULL(    23606, "MOBILE_IS_NULL"    , "手机号不能为空" , false),
    COUPON_AMOUNT_IS_VALID(    23607, "COUPON_AMOUNT_IS_VALID"    , "优惠券面额非法" , false),
    COUPONS_IS_USE_END(     23608, "COUPONS_IS_USE_END", "优惠券礼包已送完", false),
    USER_INFO_NOT_EXISTS(     23609, "USER_INFO_NOT_EXISTS", "用户信息未注册", false),
    NOT_IN_THE_ACTIVITY(    23610, "NOT_IN_THE_ACTIVITY", "不在活动期内", false),
    NOT_GRANT_AGAIN(    23611, "NOT_GRANT_AGAIN", "请勿重复领取", false),
    CITY_ID_IS_NULL(    23612, "CITY_ID_IS_NULL"    , "城市id不能为空" , false),
    COUPON_TEMPLATE_NOT_EXISTS(    23613, "COUPON_TEMPLATE_NOT_EXISTS"    , "优惠券模板不存在。" , false),
    COUPON_TEMPLATE_DISABLE(    23614, "COUPON_TEMPLATE_DISABLE"    , "该优惠券模板已停用。" , false),
    COUPON_IS_NONE(    23615, "COUPON_IS_NONE"    , "该优惠券已经领完了。" , false),
    COUPON_CODE_NOT_EXISTS(    23616, "COUPON_CODE_NOT_EXISTS"    , "优惠券码不存在。" , false),
    ALREADY_GRANT_YOU(    23617, "ALREADY_GRANT_YOU"    , "你已经领取了该优惠券码。" , false),
    ALREADY_GRANT_OTHER(    23618, "ALREADY_GRANT_OTHER"    , "该优惠券码已经被别人领取过了。" , false),
    ILLEGAL_COUPON_TYPE(    23619, "ILLEGAL_COUPON_TYPE"    , "不是合法的优惠券类型。" , false),
    ILLEGAL_COUPON_DISCOUNT(    23620, "ILLEGAL_COUPON_DISCOUNT"    , "不是合法的折扣值。" , false),
    ILLEGAL_COUPON_USE_TIME(    23621, "ILLEGAL_COUPON_USE_TIME"    , "优惠券不在使用时间范围内。" , false),
    ;
    protected int id;

    protected String code;

    protected String label;

    protected boolean success;

    AssetsErrorEnum(int id, String code, String label, boolean success) {
        this.id = id;
        this.code = code;
        this.label = label;
        this.success = success;
    }

    @Override
    public int getId() {
        return id;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public boolean isSuccess() {
        return success;
    }
}
